package ch07.service.impl;

import ch07.dao.sysUser.SupplierMapper;
import ch07.pojo.Supplier;
import ch07.service.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("supplierService")
public class SupplierServiceImpl implements SupplierService {

    private SupplierMapper supplierMapper;

    public SupplierMapper getSupplierMapper() {
        return supplierMapper;
    }

    public void setSupplierMapper(SupplierMapper supplierMapper) {
        this.supplierMapper = supplierMapper;
    }

    @Override
    public List<Supplier> selectSupplierList(Supplier supplier) {
        try{
            return supplierMapper.selectSupplierList(supplier);
        }catch (RuntimeException e){
            e.printStackTrace();
            throw e;
        }
    }
}
